// JavaScript Document

/*滑动门*/	
$(function() {
        $(".nav > p").mouseover(function() {       
            $(".nav > p").removeClass("cur");
            $(this).addClass("cur");
            $(".text_box").css("display", "none");
            $("#a" + $(this).attr("v")).css("display", "block");
        });

    })
	

$(function(){
	 $(".timetable td").mousemove(function(event) {
            e = event ? event : window.event;
            if (e.pageX) {
                w = e.pageX-150;
                h = e.pageY+10;
            }
            else {
                w = e.clientX-150;
                h = e.clientY+document.documentElement.scrollTop+10;
            }
            $(this).children(".bg").css({ "display": "block", "left": w + "px", "top":  h  + "px" });
        });
        $(".timetable td").mouseout(function() {
            $(this).children(".bg").css("display", "none");
        });

	$(".sale_head_1").mousemove(function(){
		$(this).children("ul").css("display","block");	
		$(this).addClass("s");
		$(".sale_head_1  img").attr("src","../images/xx.jpg"); 
	});
	
	$(".sale_head_1").mouseout(function(){
		$(this).children("ul").css("display","none");
		$(this).removeClass("s");
		$(".sale_head_1  img").attr("src","../images/xx.jpg");
	});
	$(".sale_head_2").mousemove(function(){
		$(this).children("ul").css("display","block");	
		$(this).addClass("s");
		$(".sale_head_2>img").attr("src","../images/xs.jpg");
	});
	
	$(".sale_head_2").mouseout(function(){
		$(this).children("ul").css("display","none");
		$(this).removeClass("s");
		$(".sale_head_2>img").attr("src","../images/xx.jpg");
	});
	$(".timetable td").mousemove(function(){
									
		$(this).children(".bg").css({"display":"block","left":event.clientX-150+"px","top":document.documentElement.scrollTop+event.clientY+10+"px"});
	});
	$(".timetable td").mouseout(function(){
		$(this).children(".bg").css("display","none");
	});
});
